package mo.leetcode_top;

public class L1550 {

    public boolean threeConsecutiveOdds(int[] arr) {

        int consecutiveCount = 0;

        for (int i = 0; i < arr.length; i++) {
            //偶数
            if ((arr[i] & 1) == 0) {
                consecutiveCount = 0;
            } else {
                consecutiveCount++;
                if (consecutiveCount == 3) {
                    return true;
                }
            }
        }

        return false;
    }

}
